package com.idas.comp.enums;

public enum Status {

	CLOSED, DISABLED, STUDENT, STAFF, ADMIN, DUMMY;

	public static Status getValue(int status) {
		switch (status) {
		case 0:
			return CLOSED;
		case -1:
			return DISABLED;
		case 1:
			return STUDENT;
		case 2:
			return STAFF;
		case 3:
			return ADMIN;
		}
		return DUMMY;
	}

	public static int getValue(Status status) {
		switch (status) {
		case CLOSED:
			return 0;
		case DISABLED:
			return -1;
		case STUDENT:
			return 1;
		case STAFF:
			return 2;
		case ADMIN:
			return 3;
		}
		return 100;
	}

	public static int getValue(String value) {
		return getValue(Status.valueOf(value.toUpperCase()));

	}
}